Skip to content

fix(http): expose Agent keep-alive timeout buffer - #8608

Merged
proggeramlug merged 1 commit into
PerryTS:mainfrom
proggeramlug:fix/4975-agent-timeout-buffer
Aug 22, 2026
Merged

proggeramlug merged 1 commit into
PerryTS:mainfrom
proggeramlug:fix/4975-agent-timeout-buffer

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • retain Node-compatible agentKeepAliveTimeoutBuffer constructor values and default invalid or missing values to 1000 ms
  • expose the ordinary writable Agent property through Perry's external-handle get/set dispatch, including GC rooting for assigned JS values
  • add a parity regression mirroring Node's test-http-agent-keep-alive-timeout-buffer.js assertions

Tests

  • cargo test --release -p perry-ext-http agent::tests -- --nocapture (8 passed)
  • cargo fmt --all -- --check
  • git diff --check
  • python3 scripts/check_test_registration.py
  • Node output matches the new parity fixture exactly

Refs #4975

No version bump.

Summary by CodeRabbit

  • New Features

    • Added support for the agentKeepAliveTimeoutBuffer option on HTTP and HTTPS agents.
    • Valid finite, non-negative values are preserved; invalid or missing values default to 1000 ms.
    • The setting can be read and updated after an agent is created.
  • Tests

    • Added coverage for valid, invalid, infinite, and omitted timeout buffer values.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant